package com.sky.service.impl;

import com.sky.service.Shopstatusservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

@Service
public class Shopstatusserviceimpl implements Shopstatusservice {

   @Autowired
   RedisTemplate  redisTemplate;
    @Override
    public Integer getshopstatus() {
        ValueOperations valueOperations = redisTemplate.opsForValue();
        Integer shopstatus = (Integer) valueOperations.get("SHOP_STATUS");
        return  shopstatus;
    }

    @Override
    public void setshopstatus(Integer shopstatus) {
        redisTemplate.opsForValue().set("SHOP_STATUS", shopstatus);
    }
}
